import request from '@/utils/request';

// 查询公告列表
export function listNotice(data, query) {
  return request({
    url: '/web/base/system/notice/page',
    method: 'post',
    data: data,
    params: query,
  });
}

// 查询公告详细
export function getNotice(noticeId) {
  return request({
    url: '/web/base/system/notice/info/' + noticeId,
    method: 'get',
  });
}

// 新增公告
export function addNotice(data) {
  return request({
    url: '/web/base/system/notice/add',
    method: 'post',
    data: data,
  });
}

// 修改公告
export function updateNotice(data) {
  return request({
    url: '/web/base/system/notice/edit',
    method: 'post',
    data: data,
  });
}

// 删除公告
export function delNotice(noticeId) {
  return request({
    url: '/web/base/system/notice/delete/' + noticeId,
    method: 'post',
  });
}
